<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <title>混入</title>
</head>
<body>
    <div id="ap"></div>
</body>
<script>
    //混入定义了一部分可复用的方法或者计算属性
    var ap = new Vue({
        el:'#ap',
        data: {
        },
        methods: {
        }
    })
    var hunRu ={
        created: function(){
            this.Xianxian();
        },
        methods:{
            Xianxian:function () {
                document.write("huanying")
            }
        }
    }
    var Component =Vue.extend({
        mixins:[hunRu]
    })
    var component =new Component();
</script>
</html>